﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;

namespace SSN.WebFramework.Controls
{
    public class PopupLink : HyperLink
    {

        private int height = 600;
        public int Height
        {
            get { return height; }
            set { height = value; }
        }

        private int width = 800;
        public int Width
        {
            get { return width; }
            set { width = value; }
        }

        public PopupLink()
        {
            LinkType = LinkType.InternalWebPage;
        }

        protected override void Render(HtmlTextWriter writer)
        {
            NavigateUrl = string.Format("javascript: SafePopUp('{0}',{1},{2})", NavigateUrl, Width, Height);
            base.Render(writer);
        }
    }
}
